<template>
  <div class="main-container">
    <div style="background-color: #fff; height: 100%" id="Basicdata">
      <a-tabs   :lazy-load="true" type="card" @change="tabsChange" justify>
        <a-tab-pane title="针筒设备维护" key="13" v-if="permissionStore.hasPermisson('cpjczl.ztsbwh')">
          <div style="height: 100%">
            <NeedleCylinderEquipment></NeedleCylinderEquipment>
          </div>
        </a-tab-pane>
        <a-tab-pane title="机台类型列表" key="1">
          <div style="height: 100%">
            <BasicdataMachineTypes></BasicdataMachineTypes>
          </div>
        </a-tab-pane>
        <!-- <a-tab-pane title="所属区域维护" key="2">
          <div style="height: 100%">
            <RegionalMaintenance></RegionalMaintenance>
          </div>
        </a-tab-pane> -->
        <a-tab-pane title="机器设备维护" key="3">
          <div style="height: 100%">
            <MachineryEquipment></MachineryEquipment>
          </div>
        </a-tab-pane>
        <!-- <a-tab-pane title="机器产能维护" key="4">
                    <div style="height: 100%">
                        <MachineCapacity></MachineCapacity>
                    </div>
                </a-tab-pane> -->
        <!-- <a-tab-pane title="类型资料" key="5">
                    <div style="height: 100%">
                        <TypeProfile></TypeProfile>
                    </div>
                </a-tab-pane> -->
        <!-- <a-tab-pane title="位置号设置" key="6">
          <div style="height: 100%">
            <LocationSettings></LocationSettings>
          </div>
        </a-tab-pane> -->
        <a-tab-pane title="维修原因维护" key="7">
          <div style="height: 100%">
            <RepairReasonMaintenance></RepairReasonMaintenance>
          </div>
        </a-tab-pane>
        <a-tab-pane title="保养项目维护" key="8">
          <div style="height: 100%">
            <MaintenanceMaintenanceItems></MaintenanceMaintenanceItems>
          </div>
        </a-tab-pane>
        <a-tab-pane title="保养类型维护" key="9">
          <div style="height: 100%">
            <MaintenanceType></MaintenanceType>
          </div>
        </a-tab-pane>
        <a-tab-pane title="保养项目模板" key="10">
          <div style="height: 100%">
            <MaintenanceForm></MaintenanceForm>
          </div>
        </a-tab-pane>
        <a-tab-pane title="设备类型设置模板" key="11">
          <div style="height: 100%">
            <TimeSetting></TimeSetting>
          </div>
        </a-tab-pane>
        <a-tab-pane title="设备设置模板" key="12">
          <div style="height: 100%">
            <TimeSetting3></TimeSetting3>
          </div>
        </a-tab-pane>
        <!-- <a-tab-pane title="设备绑定保养人员" key="13">
          <div style="height: 100%">
            <TimeSetting4></TimeSetting4>
          </div>
        </a-tab-pane> -->
      </a-tabs>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import emitter from '@/hooks/useEventBus'
import usePermission from '@/store/modules/permission'
import RepairReasonMaintenance from './components/RepairReasonMaintenance.vue'
import TimeSetting from './components/TimeSetting.vue'
import TimeSetting3 from './components/TimeSetting3.vue'
import TimeSetting4 from './components/TimeSetting4.vue'
import MaintenanceForm from './components/MaintenanceForm.vue'
import MaintenanceType from './components/MaintenanceType.vue'
import MaintenanceMaintenanceItems from './components/MaintenanceMaintenanceItems.vue'

export default defineComponent({
  name: 'Basicdata',
  setup() {
    const pageData = reactive({
      tableIndex: '1',
    })
    const permissionStore = usePermission()
    const tabsChange = (e: string | number) => {
      emitter.emit('window-change')
      if(e==='13'){
        emitter.emit('NeedleCylinderEquipment')
      }
    }
    return {
      pageData,
      tabsChange,
    permissionStore,
    }
  },
  components: {
    MaintenanceMaintenanceItems,
    RepairReasonMaintenance,
    TimeSetting,
    MaintenanceForm,
    MaintenanceType,
    TimeSetting3,
    TimeSetting4,
  },
})
</script>
<style scoped>
.main-container {
  height: 100%;
}

:deep(.ag-cell-value) {
  user-select: initial;
  -moz-user-select: text;
  -ms-user-select: text;
  -webkit-user-select: text;
}
</style>
